package com.czl.module_service.viewmodel

import androidx.databinding.ObservableField
import com.czl.base.base.BaseViewModel
import com.czl.base.base.MyApplication
import com.czl.base.binding.command.BindingAction
import com.czl.base.binding.command.BindingCommand
import com.czl.base.data.DataRepository
import com.czl.base.event.SingleLiveEvent

/**
 * @author by xubin,
 * @date on 2022/1/18.
 * PS: Not easy to write code, please indicate.
 */
class WarehousingHomeViewModel(application: MyApplication, model: DataRepository) :
    BaseViewModel<DataRepository>(application, model) {

    val uc = ChangeEvent()

    val selectedType = ObservableField("")

    class ChangeEvent {
        val bottomSheetTypeEvent = SingleLiveEvent<Any>()
    }

    val typeClickCommand: BindingCommand<Void> = BindingCommand(BindingAction {
        uc.bottomSheetTypeEvent.postValue("")
    })
}